using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rotempco.Core.ORM.Logic;
using System.Linq.Expressions;

namespace Rotempco.Core.Logic
{
    public class PropertyLogic
    {
        /// <param name="expression">(Object d) => d.PropertyName</param>
        /// <returns></returns>
        public static string GetPropertyName<T, TReturn>(Expression<Func<T, TReturn>> expression)
        {
            return SymbolExtensions.GetPropertyPair(expression).PropertyName;
        }
    }
}
